
namespace HD.Model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    
    public class Department
    {
       
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Required(ErrorMessageResourceName="DepartmentNameRequiredMessage",ErrorMessageResourceType=typeof(Resource))]
        [MaxLength(20, ErrorMessageResourceName = "DepartmentNameMaxMessage", ErrorMessageResourceType = typeof(Resource))]
        public string Name { get; set; }
        [MaxLength(20, ErrorMessageResourceName = "DepartmentDescriptionMaxMessage", ErrorMessageResourceType = typeof(Resource))]
        public string Description { get; set; }
    
        public virtual ICollection<Employee> Employees { get; set; }
    }
}
